package com.zzyl.member.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zzyl.member.domin.Family;
import com.zzyl.member.vo.FamilyMyVo;
import com.zzyl.member.vo.FamilyPage;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
 * TODO
 *
 * @Author mr.wu
 * @Date 2025/10/29 19:36
 */
public interface FamilyMapper extends BaseMapper<Family> {

    //查询家人列表
    List<FamilyMyVo> selectMyFamily(Long userId);

    //查看家人列表（分页查询）
    List<FamilyPage> selectByPage(Long userId);


    /**
     *
     * @param startTime
     * @param endTime
     * @param iotId
     * @param functionId
     * @return
     */
    @MapKey("")
    List<Map<String, Object>> queryDeviceDataListByDay(@Param("startTime") LocalDateTime startTime,@Param("endTime") LocalDateTime endTime,@Param("iotId") String iotId, @Param("functionId") String functionId);

    @MapKey("")
    List<Map<String, Object>> queryDeviceDataListByWeek(@Param("startTime") LocalDateTime startTime,@Param("endTime") LocalDateTime endTime,@Param("iotId") String iotId, @Param("functionId") String functionId);
}